
import java.io.DataInputStream;
import java.io.DataOutputStream;

import lejos.pc.comm.NXTConnector;

public class ConnectorPC {
	
	private NXTConnector connection;
	private DataOutputStream dos = null;
	private DataInputStream dis = null;
	
	public ConnectorPC() {
		connection = new NXTConnector();
	}
	
	public boolean connect(String mac) {
		// Connect to any NXT over Bluetooth
		boolean connected = connection.connectTo("btspp://" );
		
		if (connected) {
			//set the data I/O streams
			dos = connection.getDataOut();
			dis = connection.getDataIn();
		}
		
		return connected;
	}
	
	public DataOutputStream getDOS() {
		return dos;
	}
	
	public DataInputStream getDIS() {
		return dis;
	}
}
